// MyFamily - XML based genealogy program.
// Copyright (C) 2006  Doug Swisher
// See the file COPYING.txt for license details.

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace DataModel
{
    public class GedComImportResults : FamilyResultsBase
    {
        private FileInfo inputFileInfo;


        public GedComImportResults(FileInfo inputFileInfo)
        {
            this.inputFileInfo = inputFileInfo;
        }


        public void LogUnhandledTag(GedComNode node)
        {
            // TODO - Doug - 8/5/2006 - Give the user the option to log or not log unhandled custom GEDCOM tags
            if (!node.Tag.StartsWith("_"))
            {
                this.LogWarning("Unhandled top-level GEDCOM tag '{0}' at line {1} of {2}.",
                    node.Tag, node.LineNumber, this.inputFileInfo.Name);
            }
        }


        public void LogUnhandledTag(GedComNode parentNode, GedComNode childNode)
        {
            // TODO - Doug - 8/5/2006 - Give the user the option to log or not log unhandled custom GEDCOM tags
            if (!childNode.Tag.StartsWith("_"))
            {
                this.LogWarning("Unhandled {0} GEDCOM tag '{1}' at line {2} of {3}.",
                    parentNode.Tag, childNode.Tag, childNode.LineNumber, this.inputFileInfo.Name);
            }
        }


        public FileInfo InputFileInfo
        {
            get { return this.inputFileInfo; }
        }
    }
}
